#include <cstdio>
#include "analisadorLexico.h"
#include "gerenErros.h"
#include "asa.h"

void iniciaParser();
void match(int tk, char* lex);
void eat(int* synch);
void eatOrSkipTo(int tk, int* synch, char* lex);
Program* program();
void typeDecl();
VarList* varDecl(VarList* varList);
void varDecl1(Type* t, Id* id);
void varDecl2();
void decl(Type* t, Id* id);
void decl1();
void functionDecl(FunctionList* fl);
Num* array();
VarList* formalList();
VarList* formalRest();
Type* type();
VarList* idList(Type* type);
VarList* idList1(NameDecl* nameDecl);
VarList* idList2(NameDecl* nameDecl);
StatementList* stmtList();
StatementList* stmtList1();
Statement* stmt();
Statement* stmtElse();
Exp* expr();
ExpList* exprList();
ExpList* exprListTail();
ExpList* exprListTail1();
CaseBlock* caseBlock();
Exp* assign();
Exp* assign1();
Exp* _or();
Exp* or1();
Exp* _and();
Exp* and1();
Exp* igualDif();
Exp* igualDif1();
Exp* relacional();
Exp* relacional1();
Exp* adicSubOrBB();
Exp* adicSubOrBB1();
Exp* multDivisao();
Exp* multDivisao1();
Exp* unarios();
Exp* primary();
Exp* primary1(Exp* exp);
Exp* primary2(Exp* exp);

int firstStmt(int tk);
int firstExp(int tk);
